<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: SINGLEDOG
  Date: 2019/9/30
  Time: 12:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="icon" href="${pageContext.request.contextPath}/images/logo_D.ico">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/Mytravels.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/qa.css">
    <script src="${pageContext.request.contextPath}/js/jquery-3.4.1.js"></script>
    <script type="application/javascript" src="${pageContext.request.contextPath}/layui/layui.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/dist/css/bootstrap.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/dist/css/bootstrap-theme.css">
    <script src="${pageContext.request.contextPath}/dist/js/bootstrap.js"></script>
    <style>
        .layui-nav .layui-nav-item a{
            font-size: 20px!important;
        }
        .achievement {
            padding: 40px 30px;
            border: 1px solid #d9d9d9;
            background-color: #fff;
            margin-bottom: 10px;
        }
        .achievement ul {
            float: left;
            text-align: center;
            font-size: 14px;
            color: #999;
            line-height: 16px;
        }
        .achievement li {
            float: left;
            width: 150px;
            height: 52px;
        }
        .achievement li a {
            display: block;
            color: #999;
        }
        .achievement strong {
            margin: -3px 0 10px;
            display: block;
            font-size: 30px;
            color: #333;
            line-height: 30px;
        }
        .achievement li+li {
            border-left: 1px solid #d9d9d9;
        }
        .achievement .btn {
            float: right;
            margin-top: 5px;
            width: 140px;
            height: 40px;
            background-color: #ff9d00;
            border-radius: 4px;
            text-align: center;
            line-height: 26px;
            color: #fff;
            font-size: 16px;
        }
    </style>
</head>
<body>
<!--导航-->
<c:choose>
    <c:when test="${memberall.userId != 0}">
        <c:if test="${memberall.userStatus == 0}">
            <img src="http://localhost:8080/mydev/images/vip.png" style="position:absolute;top:23px;right: 345px;z-index: 999;">
        </c:if>
        <c:if test="${memberall.userStatus == 1}">
            <a href="http://localhost:8080/mydev/VIP" style="position:absolute;top:13px;right: 400px;z-index: 999;">开通vip</a>
        </c:if>
    </c:when>
</c:choose>
<div class="header-container" style="width: 100%; min-width: 1500px;  ">

    <div class="row first-div" style="z-index: 999; width: 100%">
        <div class=" left-nav-ul" >
        </div>


        <ul class="mid-nav-ul" >
            <li class="nav-ul-li" >
                <a   style="text-decoration: none" href="http://localhost:8080/mydev/start/index">
                    <div>
                        <img src="http://localhost:8080/mydev/images/logo.png">
                        逍遥游
                    </div>
                </a>

            </li>
            <li class="nav-ul-li" style="background-color: #ff9d00">
                <a style="text-decoration: none;color: #ffffff" href="http://localhost:8080/mydev/start/index">首页</a>
            </li>
            <li class="nav-ul-li">
                <a  style="text-decoration: none" href="http://localhost:8080/mydev/QuestionTable/club_questions">问答</a>
            </li>

            <li class="nav-ul-li">
                <a   style="text-decoration: none" href="http://localhost:8080/mydev/clublist/list">鲲鹏俱乐部</a>
            </li>

            <li class="nav-ul-li new">
                <div class="geren">
                    <a  style="text-decoration: none; color:black" href="">更多</a>
                    <div class="t1"></div>
                </div>
                <div class="hidden1">
                    <ul class="geren-ul">
                        <li>
                            <a  style="text-decoration: none" href="http://localhost:8080/mydev/write/travel">写游记</a>
                        </li>
                        <li>
                            <a  style="text-decoration: none"  href="http://localhost:8080/mydev/myhome/mytravel/${memberall.userId}">我的游记</a>
                        </li>
                    </ul>
                </div>
            </li>

            <li class="nav-ul-li" >
                <c:choose>
                    <c:when test="${memberall.userId != 0}">
                        <c:if test="${memberall.userStatus ==0}">
                             <span  style="color: gold">
                                 欢迎!${memberall.userName}
                             </span>
                        </c:if>
                        <c:if test="${memberall.userStatus ==1}">
                             <span  style="color: black">
                                 欢迎!${memberall.userName}
                             </span>
                        </c:if>


                    </c:when>
                    <c:otherwise>
                        <a  style="text-decoration: none" href="http://localhost:8080/mydev/regist/normalRegist">注册</a>
                    </c:otherwise>
                </c:choose>

            </li>
            <li class="nav-ul-li">
                <c:choose>
                    <c:when test="${memberall.userId != 0}">

                    </c:when>
                    <c:otherwise>
                        <a  style="text-decoration: none" href="http://localhost:8080/mydev/login/login">登陆</a>
                    </c:otherwise>
                </c:choose>


            </li>
        </ul>




        <c:choose>
            <c:when test="${memberall.userId != 0}">

                <div class="right-nav-ul" >
                    <div class="topmaguser" style="  position:relative;left: 0px;top:2px">


                        <a href="http://localhost:8080/mydev/myhome/mytravel/${memberall.userId}" >
                            <img src="http://localhost:8080/mydev/${memberall.userPicture}">
                        </a>

                    </div>
                    <ul class="right-mid" >
                        <li class="nav-ul-li new" >

                            <div class="geren">

                                <a style="text-decoration: none; color:black" href="">个人中心</a>

                                <div class="t2"></div>
                            </div>

                            <div class="hidden1">
                                <ul class="gere-ul">

                                    <li style="height: 45px;">
                                        <a  style="text-decoration: none" href="http://localhost:8080/mydev/myfoot/collect/${memberall.userId}"><img src="http://localhost:8080/mydev/images/savea.png">我的收藏</a>
                                    </li>
                                    <li style="height: 45px;">
                                        <a  style="text-decoration: none" href="http://localhost:8080/mydev/myfoot/mapview/${memberall.userId}"><img src="http://localhost:8080/mydev/images/foot.png">我的足迹</a>
                                    </li>
                                    <li style="height: 45px;">
                                        <a  style="text-decoration: none" href="http://localhost:8080/mydev/myfoot/answer/${memberall.userId}"><img src="http://localhost:8080/mydev/images/question.png">我的问答</a>
                                    </li>
                                    <li style="height: 45px;">
                                        <a  style="text-decoration: none" href="http://localhost:8080/mydev/reply/toaccount/${memberall.userId}"><img src="http://localhost:8080/mydev/images/question.png">回复消息</a>
                                    </li>

                                    <li style="height: 45px;">
                                        <a  style="text-decoration: none" href="http://localhost:8080/mydev/exit"><img src="http://localhost:8080/mydev/images/banka.png">退出登录</a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                    </ul>
                </div>
            </c:when>
            <c:otherwise>



            </c:otherwise>
        </c:choose>

    </div>
</div>
<!--图片-->
<div class="user-banner" style="background-image:url(${pageContext.request.contextPath}/images/reba_D.jpg);width: 100%;height: 250px;" data-v-486b535c></div>
<!--中部导航-->
<ul class="layui-nav layui-bg-green" style="background-color: #ffa800!important;">
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href=""></a></li>
    <li class="layui-nav-item"><a href="${pageContext.request.contextPath}/hishome/mytravel/${aaa}">TA的游记</a></li>
    <li class="layui-nav-item layui-this"><a href="">TA的问答</a></li>
    <li class="layui-nav-item">
        <a href="">TA的收藏</a>
    </li>
</ul>
<!--下部详细-->
<div class="center clearfix">
    <div class="side_bar note_side flt1">
        <div class="MUsers">
            <div class="MUsersTitle">最新访客</div>
            <div class="MUsersDetail">
                <div class="MUsersAtom">
                    <ul class="clearfix">
                    </ul>
                </div>
            </div>
            <div class="MUsersBehavior">
                <span >累计访问<i id="countofvisited">0</i></span ><span>今日<i id="countofvisited_today">0</i></span>
            </div>
        </div>
    </div>
    <div class="content flt2">
        <div class="common_block my_notes">
            <div class="achievement clearfix">
                <ul>
                    <li><a><strong>0</strong><div>内容数</div></a></li>
                    <li>
                        <strong class="goldmedal"><i></i>0</strong><div>金牌回答</div>
                    </li>
                    <li><strong>0%</strong><div>采纳率</div></li>
                </ul>
                <a class="btn" href="/wenda/publish.html">我要提问</a>
            </div>
            <div id="article_list">
                <div class="bd newcate-bd">
                    <ul class="_j_paper_box">
                        <c:forEach items="${list1}" var="collection">
                            <li class="item clearfix " data-qid="6803840">
                            <div class="title">
                                <%--问表：问题标题--%>
                                <a href="/wenda/detail-6803840.html" target="_blank">${collection.travTitle}</a></div>
                            <div class="container" style="width: 695px">
                                <%--用户表：用户头像--%>
                                <div class="avatar"><a href="/wenda/u/53705315/answer.html" target="_blank" class="_j_filter_click"><img class="_j_filter_click" src="${pageContext.request.contextPath}/${collection.memeber.userPicture}"></a></div>
                                <div class="user-info">
                                    <%--用户表：用户昵称--%>
                                    <a class="name _j_filter_click" href="/wenda/u/53705315/answer.html" target="_blank">${collection.memeber.userNickname}</a>
                                </div>
                                <div class="desc clearfix">
                                    <a href="/wenda/detail-6803840-11039444.html" target="_blank" style="color: #666;">
                                        <%--问表：问题配图--%>
                                        <script>
                                            console.log(${pageContext.request.contextPath}/${collection.travPic});
                                        </script>
                                        <img src="${pageContext.request.contextPath}/${collection.travPic}" width="150" height="100">
                                            <%--答表：回答内容--%>
                                        <p style="width: 450px">
                                            <c:if test="${fn:length(collection.travText)>127}">${fn:substring(collection.travText,0,127)}...</c:if>
                                            <c:if test="${fn:length(collection.travText)<=127}">${collection.travText}</c:if>
                                        </p>
                                    </a>
                                </div>
                                <div class="operate">
                                    <%--答表：点赞量--%>
                                    <div class="zan" style="float: right">${collection.travPraise}<img src="${pageContext.request.contextPath}/images/ding_D.png"></div>
                                    <%--问表：发布地址--%>
                                    <div class="mdd"><a href="/wenda/area-187613.html" class="_j_filter_click" target="_blank"><img src="${pageContext.request.contextPath}/images/dibiao_D.png">${collection.location}</a></div>
                                    <div class="cate-share">
                                        <a class="_js_showShare _j_filter_click">分享</a>
                                        <div class="cate-share-pop _j_share_pop hide clearfix" data-title="你有过哪些游轮旅行经历？如何选择一条适合自己的游轮线路？" data-qid="6803840" data-aid="11039444" data-anum="83" data-content="我刚坐了公主皇冠号（Crown Princess Cruise）邮轮回来（往下看有介绍行程和特色）。选定邮轮之前，我做了很长时间的研究，分析岛国差别，邮轮差别，路线差别。但是到了最最最后时刻，让我做下决定的是下面几个要素，我供你参考，以便你自己分析什么才是你想要的...">
                                            <a title="分享到新浪微博" class="sina _j_do_share _j_filter_click" data-site="wb" data-username="抱抱兔"></a>
                                            <a title="分享到QQ空间" class="zone _j_do_share _j_filter_click" data-site="qz" data-username="抱抱兔"></a>
                                            <a title="分享到微信" class="weixin _j_do_share_wx _j_filter_click" data-site="wx" data-username="抱抱兔"></a>
                                        </div>
                                    </div>
                                    <a href="/wenda/detail-6803840-11039444.html" target="_blank" style="text-decoration: none;">
                                        <span class="reply">评论 </span>
                                        <%--评论表：评论量--%>
                                        <span class="reply">(${collection.travLooknumber})</span>
                                    </a>
                                    <%--答表：发布日期--%>
                                        <span class="date">发布于 <fmt:formatDate value="${collection.day}" pattern="yyyy-MM-dd hh:mm"/></span>
                                </div>
                            </div>
                        </li>
                        </c:forEach>
                    </ul>
                </div>
            </div>
            <div align="right" class="m-pagination _j_pager_content">
            </div>
        </div>
    </div>
</div>
<!--底部-->
<div class="buttom">
    <div class="col-md-2 "></div>
    <div class="col-md-2 left-buttom">
        <p style="font-size: 15px">逍遥游攻略网</p>
        <p>年轻人更爱用的攻略</p>
        <p>逍遥游攻略网</p>
        <p>无数旅行者共同打造的"旅行神器"</p>
        <p>  60,000 多个全球旅游目的地 </p>
        <p>  600,000 个细分目的地新玩法</p>
        <p>  760,000,000 次攻略下载</p>
    </div>
    <div class="col-md-2 mid-buttom">
        <p style="font-size: 15px">关于我们</p>
        <a href="">关于逍遥游</a> &nbsp <a href="">联系我们</a> </br>
        <a href="">隐私政策</a> &nbsp <a href="">商标声明</a> </br>
        <a href="">服务协议</a> &nbsp <a href="">游记协议</a> </br>
        <a href="">商城平台服务协议</a> </br>
        <a href="">网络信息侵权通知引导</a><br>
        <a href="">旅游网服务监督员</a>



    </div>
    <div class="col-md-2 right-buttom">
        <p  style="font-size: 15px">旅行服务</p>
        <a href="">旅游攻略</a> &nbsp <a href="">酒店预订</a> </br>
        <a href="">旅游特价</a> &nbsp <a href="">国际租车</a> </br>
        <a href="">旅游问答</a> &nbsp <a href="">旅游保险</a> </br>
        <a href="">旅游指南</a> &nbsp <a href="">订火车票</a> </br>
        <a href="">旅游资讯</a> &nbsp <a href="">APP下载</a> </br>

    </div>

    <div class="col-md-1 link-buttom">
        <img src="${pageContext.request.contextPath}/images/erweima1B.png"></br>
        <p>app下载</p>
    </div>
    <div class="col-md-1 link-buttom">
        <img src="${pageContext.request.contextPath}/images/erweima2B.png">
        <p>公众号</p>
    </div>
    <div class="col-md-1 link-buttom">
        <img src="${pageContext.request.contextPath}/images/erweima3B.png">
        <p>订阅号</p>
    </div>


</div>
<div class="dixian">我们是有底线的</div>

<script>
    layui.use('element', function(){
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

        //监听导航点击
        element.on('nav(demo)', function(elem){
            //console.log(elem)
            layer.msg(elem.text());
        });
    });

    function count(){
        $.ajax({
            url:"${pageContext.request.contextPath}/myfoot/count",
            type:"post",
            datatype:"json",
            data:{
                "userid":1
            },
            success:function (result) {
                console.log(result);
                var str =  result.split(",");
                // document.getElementById("travelnote").innerText=str[0];
                document.getElementById("countofvisited").innerText=str[1];
                // document.getElementById("reply").innerText=str[2];
                // document.getElementById("readed").innerText=str[2];
                document.getElementById("countofvisited_today").innerText=str[3];
                console.log(str[3]);
            }
        });
    }
    count();
</script>
</body>
</html>